home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / PowerPlant / Multi-Panel Dialogs 1.1 / MPD Sources / CMPDPanel.h < prev    next >
Encoding:
Text File  |  1996-09-09  |  1.5 KB  |  42 lines  |  [TEXT/R*ch]

  1. // ===========================================================================
  2. //    File:                        CMPDPanel.h
  3. // Version:                    1.0 - Feb 1, 1996
  4. //    Author:                    Mike Shields (mshields@inconnect.com)
  5. //                            
  6. //    Copyright ©1996 Mike Shields. All rights reserved.
  7. // ===========================================================================
  8. //
  9. // Abstract base class for a view which is included as needed by 
  10. // your typical multipane dialog
  11.  
  12. #pragma once
  13.  
  14. #include <LView.h>
  15.  
  16. class CMPDPanel : public LView
  17. {
  18. public:
  19.                             CMPDPanel() { }
  20.                             CMPDPanel(const CMPDPanel &inOriginal) 
  21.                                 : LView(inOriginal) { }
  22.                             CMPDPanel(const SPaneInfo &inPaneInfo, const SViewInfo &inViewInfo) 
  23.                                 : LView(inPaneInfo, inViewInfo) { }
  24.                             CMPDPanel(LStream *inStream) 
  25.                                 : LView(inStream) { }
  26.     virtual                ~CMPDPanel() { }
  27.     
  28.     // Subclasses must overide this function to replace the data contained in the handle
  29.     // passed in with the data currently displayted in the panel
  30.     virtual void        GetData(Handle inDataToReplace) = 0;
  31.     
  32.     // Subclasses must overide this function to take the data contained in the handle
  33.     // passed in and display it in the panel.
  34.     virtual void        SetData(Handle inData) = 0;
  35.     
  36.     // Subclasses can overide this function to perform validation on the data displayed in
  37.     // the panel and report any discrepancies to the calling function.
  38.     virtual Boolean    ValidatePanel(void) { return true; };
  39.     virtual Boolean    WantDefaultsButton(void) const { return true; };
  40.     virtual Boolean    WantRevertButton(void) const { return true; };
  41. };
  42.